/*
    Coder : Dzlua
    Email : 505544956@qq.com
    Time  : 2017/07/04
*/
#include "player/player.h"
using namespace dzlua;

#include <iostream>
using std::cout;
using std::endl;
using std::cerr;

int main(int argc, char *argv[])
{
    if (argc != 2) {
        cerr << "args err. <filename>" << endl;
        return 1;
    }

    auto pl = av::Player::NewInterface();

    bool bok = pl->Init();
    if (!bok) {
        cerr << "init err." << endl;
        return 2;
    }

    bok = pl->Open(argv[1]);
    if (!bok) {
        cerr << "open err." << endl;
        return 3;
    }

    pl->Run();

    return 0;
}
